package com.grp6.game.chess.model;

import java.util.ArrayList;
import java.util.List;

import com.grp6.game.chess.view.ChessPlaceView;
import com.grp6.game.model.AbstractObservableModel;
import com.grp6.game.model.IPlace;

public class ChessPlace extends AbstractObservableModel<ChessPlaceView> implements IPlace<ChessPlaceView>{

	private boolean black;

	public boolean isBlack() {
		return black;
	}

	public ChessPlace(Boolean black){
		this.black = black;
	}
	
	public static enum Color{
		Black,White
	}

	private List<ChessPiece> pieces = new ArrayList<ChessPiece>();
	private boolean clicked;
	
	@Override
	public List<ChessPiece> getPieces() {
		return pieces;
	}

	@Override
	public void actionPerformed(String actionName) {
		clicked = true;
		notifyObservers();
	}

	public boolean isClicked() {
		return clicked;
	}

	public void setClicked(boolean clicked) {
		this.clicked = clicked;
	}

}
